package test1202;

import com.qf.bean.Grade2;
import com.qf.bean.Student2;
import com.qf.service.Student2Service;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 2019/12/2
 * Administrator
 * springdata1130
 * 面向对象面向君  不负代码不负卿
 */
public class Demo1 {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("springData.xml");
        Student2Service student2Service=(Student2Service) applicationContext.getBean("stuservice");
       // student2Service.insert(new Grade2("一年级"),new Student2("张三"));
        //Student2 student2 = student2Service.findbysid(1);
      //  System.out.println("student2="+student2);
        Grade2 grade2 = student2Service.findbygid(1);
        System.out.println(grade2.getGname());
        System.out.println("=======================");
        System.out.println(grade2.getStudent2List());
    }
}
